import request from '@/utils/request'

/**
 * 获取员工列表
 * @param { page, pageSize, name} params
 * @returns
 */
export function getEmployeeListAPI(params) {
  return request({
    url: '/park/sys/user',
    params
  })
}

// 获取角色信息
export function getRoleListAPI() {
    return request({
        url: '/park/sys/role'
    })
}

export function createEmployeeAPI(data) {
    return request({
      url: `/park/sys/user`,
      method: 'POST',
      data
    })
  }

  export function delEmployeeAPI(id) {
    return request({
      url: `/park/sys/user/${id}`,
      method: 'DELETE'
    })
  }

  export function putEmployeeAPI(data) {
    return request({
      url: `/park/sys/user`,
      method: 'PUT',
      data
    })
  }


  export function getEmployeeIdApi(id){
    return request({
      url: `/park/sys/user/${id}`
    })
  }

  export function resetPassword(id){
    return request.put('park/sys/user/resetPwd',{id})
  }